unit ubaseview;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, db, FileUtil, TplShapesUnit, Forms, Controls, Graphics,
  Dialogs, ExtCtrls, DBGrids, Buttons, StdCtrls, uBase, uMain;

type

  { TFormBaseView }

  TFormBaseView = class(TFormBase)
    DBGrid1: TDBGrid;
    dsMain: TDatasource;
    Panel1: TPanel;
    SpeedButton1: TSpeedButton;
    lbCaption: TStaticText;
    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
    procedure FormShow(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { private declarations }
  public
    procedure Keluar;virtual;
    { public declarations }
  end; 

var
  FormBaseView: TFormBaseView;

implementation

{$R *.lfm}

{ TFormBaseView }

procedure TFormBaseView.FormShow(Sender: TObject);
begin
  lbCaption.Caption:=Self.Caption;
  FormMain.ActiveDataSet:=dsMain.DataSet;
  dsMain.DataSet.Close;
end;

procedure TFormBaseView.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
  ShowMessage('test');
end;


procedure TFormBaseView.FormClose(Sender: TObject; var CloseAction: TCloseAction
  );
begin

  inherited;
end;

procedure TFormBaseView.SpeedButton1Click(Sender: TObject);
begin
  //Self.Close;
  Keluar;
end;

procedure TFormBaseView.Keluar;
begin
  FormMain.ActiveDataSet:=nil;
end;

end.

